<template>
	<view class="container">
	<!-- 	<view class="cu-form-group" v-if="service.phone">
			<view class="title">客服电话</view>
			<input name="input" :value="service.phone" disabled="true"></input>
		</view>
		<view class="cu-form-group" v-if="service.timeText">
			<view class="title">服务时间</view>
			<input name="input" :value="service.timeText" disabled="true"></input>
		</view>
		<view class="cu-form-group" v-if="service.address">
			<view class="title">客服位置</view>
			<input name="input" :value="service.address" disabled="true"></input>
		</view>
		<view class="cu-form-group justify-start" v-if="service.weixin">
			<view class="title">客服微信</view>
			<image style="width: 200upx;height: 200upx;" :src="host + service.weixin" @click="showImg"></image>
		</view> -->
		<view>
			<web-view src="https://tb.53kf.com/code/client/4d7d328bcd70c875443edbbb784dc48f1/1?device=android"></web-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				service:{},
				host:''
			}
		},
		onLoad() {
			var that = this;
			this.host = this.$host;
			that.$network.nonAuthRequest("InitAction/getService", {}, function(res) {
				that.service = res.data.service;
			}, "", function(res) {
				console.error(JSON.stringify(res))
				uni.showToast({
					icon: 'none',
					title: '加载失败',
					duration: 1200
				})
			});
		},
		methods: {
			/** 展示图片 **/
			showImg(){
				if(this.service.weixin){
					let imgs = [];
					let url = this.host + this.service.weixin;
					imgs.push(url)
					uni.previewImage({
						urls:imgs,
						current:url
					})
				}
			}
		}
	}
</script>

<style>

</style>
